package com.central.post.service

import com.baomidou.mybatisplus.extension.plugins.pagination.Page
import com.central.common.entity.NewGood
import com.central.common.model.CommonResult
import com.central.common.model.PageVo
import com.central.common.model.SysUser
import com.central.common.service.ISuperService
import com.central.post.pojo.newGood.NewGoodDetailVo
import com.central.post.pojo.newGood.NewGoodDto
import com.central.post.pojo.newGood.NewGoodList
import com.central.post.pojo.newGood.NewGoodSearchDto
import com.sun.org.apache.xpath.internal.operations.Bool

/**
 * @author  fly
 * @date  2021/5/26 14:50
 * @version 1.0
 */
interface NewGoodService : ISuperService<NewGood> {


    /**
     * 添加或者更新上新商品
     */
    fun saveOrUpdateNewGood(newGoodDto: NewGoodDto, userId: Long): CommonResult<Boolean>

    /**
     * 移除上新产品
     */
    fun removeNewGood(ids: String): CommonResult<Boolean>

    /**
     * 获取上新列表
     */
    fun getNewGoodListByTime(newGoodSearchDto: NewGoodSearchDto, pageVo: PageVo): CommonResult<Page<NewGoodList>>

    /**
     * 获取上新详情
     */
    fun getNewGoodDetail(id: Long,  sysUser: SysUser, pageVo: PageVo): CommonResult<NewGoodDetailVo>

    /**
     * 订阅上新提醒
     */
    fun subscribeNewGood(id: Long, sysUser: SysUser): CommonResult<Boolean>
}
